package com.liangzai.适配器模式.service.lizi;

import java.util.List;

/**
 * @author leiliang
 * @version 1.0
 * @Description
 * @date 2021/10/29 15:35
 */
public class LogAdapter extends  LogWriteFileServiceImpl implements LogWriteDbService {
    @Override
    public void logWriteDb(LogBean logbean) {
        // 1.读取本地文件
        List<LogBean> logBeans = this.readLogFile();
        logBeans.add(logbean);
        // 2.将数据写入到数据库中
        System.out.println(">>>写入到数据库中..");
        // 写入本地文件
        this.logWriteFile();

    }
}
